<!DOCTYPE html>
<!-- saved from url=(0189)http://localhost:8080/css/9.%E5%AE%9A%E4%BD%8D%E5%B8%83%E5%B1%80/5.%E6%8E%A7%E5%88%B6%E5%85%83%E7%B4%A0%E5%B1%85%E4%B8%AD%E5%AE%9A%E4%BD%8D%E7%9A%84%E5%87%A0%E7%A7%8D%E6%96%B9%E5%BC%8F.html -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>5.控制元素居中定位的几种方式</title>
  <style>
    article {
      width: 400px;
      height: 400px;
      border: solid 8px blueviolet;
      margin: 100px;
      position: relative;
      overflow: hidden;
    }

    div {
      background: red;
      height: 200px;
      width: 200px;
      position: absolute;
      left: 50%;
      top: 50%;
      right: -100px;
      bottom: -100px;
    }
  </style>
</head>

<body><script id="__bs_script__">//<![CDATA[
    document.write("<script async src='/browser-sync/browser-sync-client.js?v=2.26.7'><\/script>".replace("HOST", location.hostname));
//]]></script><script async="" src="./5.控制元素居中定位的几种方式_files/browser-sync-client.js"></script>

  <article>
    <div></div>
  </article>



</body></html>